﻿using EAS.Common.Players;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent.Creative;
using Terraria.ID;
using Terraria.ModLoader;

namespace EAS.Content.Items
{
    public class BoilingWaterBottle : ModItem
    {
        public override void SetStaticDefaults()
        {
            ItemID.Sets.AnimatesAsSoul[Item.type] = true;
            CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
            Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(30, 2));
        }

        public override void SetDefaults()
        {
            Item.width = 20;
            Item.height = 28;
            Item.accessory = true;
            Item.rare = ItemRarityID.Orange;
            Item.value = Item.sellPrice(0, 1, 0, 0);
        }

        public override void UpdateAccessory(Player player, bool isHidden)
        {
            player.GetModPlayer<AccPlayer>().BoilingWaterBottle = true;
        }

        public override void AddRecipes()
        {
            Recipe recipe = Recipe.Create(Type, 1);
            recipe.AddIngredient(ItemID.LavaBucket, 1);
            recipe.AddIngredient(ItemID.BottledWater, 1);
            recipe.AddTile(TileID.CookingPots);
            recipe.Register();
        }
    }
}
